#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPaintEvent>
#include <QPainter>
#include <QImage>
#include <QTime>
#include <QTimer>

#include <QFileDialog>

#include "initmap.h"
#include "resizeui.h"

namespace Ui {
class MainWindow;
}



#define TotalTimes 200

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

//    void paintEvent(QPaintEvent *);
    void resizeEvent(QResizeEvent *event);
    ResizeUI resizeUi;

    void showPic(int width, int height);


private slots:
    void showMove();
    void showMove1();

    void showBack();
    void showBack1();

    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_btn3_clicked();

    void showProgress();

    void readMapComplete();

    void on_btn4_clicked();

    void on_btn5_clicked();

    void on_btn6_clicked();

    void on_btn7_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_4_clicked();

private:
    Ui::MainWindow *ui;
    QImage img1,img2;
    int img1_width;
    int img1_height;


    int showTimes=0;
    QTimer *timer;
    QTimer *timer1;

    QTimer *timer2;
    QTimer *timer3;

    InitMap imgMap;

    bool startReadMap=false;

    int resolution=200;
};

#endif // MAINWINDOW_H
